Skip to content

[Windows] Fix for MenuFlyoutItem displaying icon in monochrome instead of original colors#32522

Open
SyedAbdulAzeemSF4852 wants to merge 4 commits intodotnet:mainfrom
SyedAbdulAzeemSF4852:fix-16119
Open

[Windows] Fix for MenuFlyoutItem displaying icon in monochrome instead of original colors#32522
SyedAbdulAzeemSF4852 wants to merge 4 commits intodotnet:mainfrom
SyedAbdulAzeemSF4852:fix-16119

Conversation

@SyedAbdulAzeemSF4852
Copy link
Copy Markdown
Contributor

Note

Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Issue Details

  • MenuFlyoutItem with FileImageSource and UriImageSource displays icon in monochrome instead of original colors.

Root Cause

  • The issue occurred because BitmapIconSource renders images in monochrome mode by default. As a result, the original colors from FileImageSource and UriImageSource were lost when displayed as icons.

Description of Change

  • Updated MenuFlyoutItemHandler.Windows.cs to set ShowAsMonochrome = false for BitmapIconSource, ensuring icons retain their original colors instead of being rendered as monochrome silhouettes.
  • Documentation : ShowAsMonoChrome

Issues Fixed

Fixes #16119

Validated the behaviour in the following platforms

  • Windows
  • Mac
  • Android
  • iOS

Output

Before After

@dotnet-policy-service dotnet-policy-service bot added community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration labels Nov 12, 2025
@sheiksyedm
Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 3 pipeline(s).

@SyedAbdulAzeemSF4852 SyedAbdulAzeemSF4852 marked this pull request as ready for review November 17, 2025 13:17
Copilot AI review requested due to automatic review settings November 17, 2025 13:17
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a Windows-specific issue where MenuFlyoutItem icons from FileImageSource and UriImageSource were displayed in monochrome instead of their original colors. The root cause was that BitmapIconSource renders images as monochrome silhouettes by default.

Key Changes

  • Updated MenuFlyoutItemHandler.Windows.cs to set ShowAsMonochrome = false for BitmapIconSource instances
  • Added UI test case to verify the fix with screenshot validation

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/Core/src/Handlers/MenuFlyoutItem/MenuFlyoutItemHandler.Windows.cs Modified MapSource method to disable monochrome rendering for BitmapIconSource, preserving original icon colors
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue16119.cs Added NUnit UI test with screenshot verification for Windows platform
src/Controls/tests/TestCases.HostApp/Issues/Issue16119.cs Created test Shell page with MenuFlyoutItem using FileImageSource to demonstrate the fix

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 9, 2025

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 32522

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 32522"

@MauiBot MauiBot added s/agent-changes-requested AI agent recommends changes - found a better alternative or issues s/agent-gate-failed AI could not verify tests catch the bug s/agent-fix-win AI found a better alternative fix than the PR s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review) labels Mar 19, 2026
Copy link
Copy Markdown
Contributor

@kubaflo kubaflo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add screenshots?

@sheiksyedm
Copy link
Copy Markdown
Contributor

/azp run maui-pr-uitests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@MauiBot MauiBot added s/agent-review-incomplete AI agent could not complete all phases (blocker, timeout, error) and removed s/agent-changes-requested AI agent recommends changes - found a better alternative or issues labels Mar 24, 2026
@SyedAbdulAzeemSF4852
Copy link
Copy Markdown
Contributor Author

Could you please add screenshots?

@kubaflo , I’ve added the baseline snapshot for the Windows platform

@MauiBot MauiBot added s/agent-changes-requested AI agent recommends changes - found a better alternative or issues and removed s/agent-review-incomplete AI agent could not complete all phases (blocker, timeout, error) labels Mar 26, 2026
@dotnet dotnet deleted a comment from MauiBot Mar 26, 2026
@MauiBot
Copy link
Copy Markdown
Collaborator

MauiBot commented Mar 26, 2026

🤖 AI Summary

📊 Expand Full Reviewe2af807 · Add baseline snapshot for Windows platform
🔍 Pre-Flight — Context & Validation

Issue: #16119 - MenuFlyoutItem with FileImageSource doesn't display icon properly
PR: #32522 - [Windows] Fix for MenuFlyoutItem displaying icon in monochrome instead of original colors
Platforms Affected: Windows only
Files Changed: 2 implementation, 3 test (including 1 snapshot)

Key Findings

  • Bug: BitmapIconSource.ShowAsMonochrome defaults to true in WinUI, causing FileImageSource/UriImageSource icons in MenuFlyoutItem and MenuFlyoutSubItem to render as monochrome silhouettes
  • Fix: Set ShowAsMonochrome = false before calling CreateIconElement() in both MenuFlyoutItemHandler.Windows.cs and MenuFlyoutSubItemHandler.Windows.cs
  • A Copilot inline review suggested applying to MenuFlyoutSubItemHandler too (now resolved); author confirmed and applied it
  • Gate FAILED: Test passed both WITH and WITHOUT the fix — the VerifyScreenshot() test cannot reliably detect the color-vs-monochrome difference
  • Snapshot VerifyMenuFlyoutIconDisplaysOriginalColor.png was added by this PR (captured after fix applied); without the fix the screenshot still matches (menu items may look visually similar at the pixel-comparison threshold)
  • Test category is UITestCategories.Page — not the most specific; UITestCategories.MenuBar or similar would be better
  • Only FileImageSource tested; UriImageSource mentioned in PR title but not separately validated

Fix Candidates

# Source Approach Test Result Files Changed Notes
PR PR #32522 Set ShowAsMonochrome = false for BitmapIconSource in MapSource on both handlers ❌ GATE FAILED (test doesn't catch regression) MenuFlyoutItemHandler.Windows.cs, MenuFlyoutSubItemHandler.Windows.cs Fix logic is correct; test quality is the issue

🔧 Fix — Analysis & Comparison

Fix Candidates

# Source Approach Test Result Files Changed Notes
1 claude-opus-4.6 Set ShowAsMonochrome = false inside ToIconSource() in ImageExtensions.cs on BitmapIconSource initializers PASS 1 file Centralized; fixes all callers (MenuFlyout, Shell, TabbedPage, Swipe)
2 claude-sonnet-4.6 Replace BitmapIconSource with ImageIconSource in ToIconSource() in ImageExtensions.cs PASS 1 file Idiomatic; SwipeItemMenuItemHandler already uses ImageIconSource this way
3 gpt-5.3-codex Handler-level IconProperty callbacks that post-process BitmapIcon.ShowAsMonochrome = false when icon changes PASS 2 files Different angle no change to ImageExtensions.cs or MapSource
4 gpt-5.4 (gemini unavailable) Improved test (Issue16119.cs) to assert native WinUI icon state + set ShowAsMonochrome = false in both handlers PASS 4 files Addresses both fix and test quality
PR PR #32522 Set ShowAsMonochrome = false in MapSource of both MenuFlyoutItemHandler.Windows.cs and MenuFlyoutSubItemHandler.Windows.cs GATE FAILED (test passes both with/without fix) 2 files Fix logic correct; test doesn't catch regression

Cross-Pollination

Model Round New Ideas? Details
claude-opus-4.6 2 NO NEW IDEAS All viable intervention points covered: icon creation layer, handler mapping layer, alternative icon type, post-processing

Exhausted: Yes
Selected Fix: Attempt 1 (centralized fix in ImageExtensions.cs) combined with test improvements from Attempt 4. Simplest change (1 file for the fix), applies to all callers.


📋 Report — Final Recommendation

⚠️ Final Recommendation: REQUEST CHANGES

Phase Status

Phase Status Notes
Pre-Flight ✅ COMPLETE Issue #16119, Windows-only, 2 impl + 3 test files
Gate ❌ FAILED Windows — test PASSED both with and without the fix
Try-Fix ✅ COMPLETE 4 attempts, all 4 passing
Report ✅ COMPLETE

Summary

PR #32522 fixes a real, confirmed bug: WinUI BitmapIconSource.ShowAsMonochrome defaults to true, causing MenuFlyoutItem and MenuFlyoutSubItem icons (from FileImageSource/UriImageSource) to render as white monochrome silhouettes instead of full color. The fix logic is correct.

However, the gate failed because the VerifyScreenshot() test passes both with and without the fix. The baseline snapshot (VerifyMenuFlyoutIconDisplaysOriginalColor.png) was captured after the fix was applied — so when the fix is removed, the screenshot of monochrome icons still matches the "fixed" baseline closely enough (or within tolerance) to pass. This means the test cannot detect a regression.

Additionally, the fix scope is narrower than necessary — alternative Attempt 1 demonstrates a single-file centralized fix in ImageExtensions.cs that benefits all callers.

Root Cause

BitmapIconSource.ShowAsMonochrome defaults to true in WinUI 3. The ToIconSource() extension method in ImageExtensions.cs creates BitmapIconSource instances for IFileImageSource and IUriImageSource without overriding this default. Every consumer of ToIconSource() (not just MenuFlyoutItemHandler and MenuFlyoutSubItemHandler) is affected.

Fix Quality

Issues with the PR's fix:

  1. Test doesn't catch the regression (blocking). The VerifyScreenshot() test passed without the fix. The baseline snapshot was captured after the fix was applied. To be a valid regression test, the snapshot must be captured from the broken baseline (monochrome icons). Without that, CI cannot detect if the fix is reverted.

  2. Fix applied in 2 handler files instead of the shared source. Setting ShowAsMonochrome = false in MenuFlyoutItemHandler.MapSource and MenuFlyoutSubItemHandler.MapSource works, but ToIconSource() in ImageExtensions.cs is the central creation point. Fixing it there (1 file change) protects all callers — including ShellItemHandler, TabbedPage, and any future handler that uses ToIconSource().

Better approach found (Attempt 1 — ✅ PASS):

// src/Core/src/Platform/Windows/ImageExtensions.cs
-image = new BitmapIconSource { UriSource = new Uri("ms-appx:///" + fis.File) };
+image = new BitmapIconSource { UriSource = new Uri("ms-appx:///" + fis.File), ShowAsMonochrome = false };

-image = new BitmapIconSource { UriSource = uri?.Uri };
+image = new BitmapIconSource { UriSource = uri?.Uri, ShowAsMonochrome = false };

One file, two-line change, applies to all consumers.

Alternative approach (Attempt 2 — ✅ PASS, most idiomatic):
Use ImageIconSource (which has no ShowAsMonochrome property) instead of BitmapIconSource. This is already the pattern used by SwipeItemMenuItemHandler.Windows.cs.

Required Changes

  1. Fix the test baseline: Delete VerifyMenuFlyoutIconDisplaysOriginalColor.png, revert the fix files, run the test to capture the broken baseline (monochrome), then re-apply the fix and run again to verify it passes. This is the only way to have a valid screenshot regression test.

  2. Optionally move the fix to ImageExtensions.cs for better centralization. The per-handler approach in the PR also works, but centralizing prevents future regressions in other handlers.

  3. Test category: UITestCategories.Page is not specific. Consider using UITestCategories.MenuFlyout or UITestCategories.MenuBar if available, or leave as-is.

Fix Comparison

Approach Files Scope Regression Test Works?
PR's fix 2 handler files MenuFlyout only ❌ No (baseline wrong)
Attempt 1 (centralized) 1 (ImageExtensions.cs) All ToIconSource() callers ❌ No (same baseline issue)
Attempt 2 (ImageIconSource) 1 (ImageExtensions.cs) All ToIconSource() callers ❌ No (same baseline issue)
Attempt 4 (test + fix) 4 files MenuFlyout + test asserting icon state ✅ Yes (automation label assertion)

The test baseline issue is the primary blocker. The fix logic itself is sound.


@MauiBot
Copy link
Copy Markdown
Collaborator

MauiBot commented Mar 29, 2026

🚦 Gate — Test Verification

📊 Expand Full Gatee2af807 · Add baseline snapshot for Windows platform

Gate Result: ❌ FAILED

Platform: WINDOWS · Base: main · Merge base: 720a9d4a

Test Without Fix (expect FAIL) With Fix (expect PASS)
🖥️ Issue16119 Issue16119 ❌ PASS — 562s ✅ PASS — 453s
🔴 Without fix — 🖥️ Issue16119: PASS ❌ · 562s
  Determining projects to restore...
  Restored D:\a\1\s\src\Graphics\src\Graphics.Win2D\Graphics.Win2D.csproj (in 20.42 sec).
  Restored D:\a\1\s\src\Graphics\src\Graphics\Graphics.csproj (in 20.42 sec).
  Restored D:\a\1\s\src\Essentials\src\Essentials.csproj (in 8.73 sec).
  Restored D:\a\1\s\src\Core\src\Core.csproj (in 17.08 sec).
  Restored D:\a\1\s\src\Controls\tests\TestCases.HostApp\Controls.TestCases.HostApp.csproj (in 6.38 sec).
  Restored D:\a\1\s\src\Controls\src\Xaml\Controls.Xaml.csproj (in 29 ms).
  Restored D:\a\1\s\src\Controls\src\Core\Controls.Core.csproj (in 24 ms).
  Restored D:\a\1\s\src\Core\maps\src\Maps.csproj (in 15.01 sec).
  Restored D:\a\1\s\src\Controls\Maps\src\Controls.Maps.csproj (in 26 ms).
  Restored D:\a\1\s\src\Controls\Foldable\src\Controls.Foldable.csproj (in 24 ms).
  Restored D:\a\1\s\src\BlazorWebView\src\Maui\Microsoft.AspNetCore.Components.WebView.Maui.csproj (in 34 ms).
  3 of 14 projects are up-to-date for restore.
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681911
  Graphics -> D:\a\1\s\artifacts\bin\Graphics\Debug\net10.0-windows10.0.19041.0\Microsoft.Maui.Graphics.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681911
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681911
  Graphics.Win2D -> D:\a\1\s\artifacts\bin\Graphics.Win2D\Debug\net10.0-windows10.0.19041.0\Microsoft.Maui.Graphics.Win2D.WinUI.Desktop.dll
  Essentials -> D:\a\1\s\artifacts\bin\Essentials\Debug\net10.0-windows10.0.19041.0\Microsoft.Maui.Essentials.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681911
  Core -> D:\a\1\s\artifacts\bin\Core\Debug\net10.0-windows10.0.19041.0\Microsoft.Maui.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681911
  Maps -> D:\a\1\s\artifacts\bin\Maps\Debug\net10.0-windows10.0.19041.0\Microsoft.Maui.Maps.dll
  Controls.BindingSourceGen -> D:\a\1\s\artifacts\bin\Controls.BindingSourceGen\Debug\netstandard2.0\Microsoft.Maui.Controls.BindingSourceGen.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681911
  Controls.Core -> D:\a\1\s\artifacts\bin\Controls.Core\Debug\net10.0-windows10.0.19041.0\Microsoft.Maui.Controls.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681911
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681911
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681911
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681911
  Controls.Foldable -> D:\a\1\s\artifacts\bin\Controls.Foldable\Debug\net10.0-windows10.0.19041.0\Microsoft.Maui.Controls.Foldable.dll
  Controls.Xaml -> D:\a\1\s\artifacts\bin\Controls.Xaml\Debug\net10.0-windows10.0.19041.0\Microsoft.Maui.Controls.Xaml.dll
  Controls.Maps -> D:\a\1\s\artifacts\bin\Controls.Maps\Debug\net10.0-windows10.0.19041.0\Microsoft.Maui.Controls.Maps.dll
  Microsoft.AspNetCore.Components.WebView.Maui -> D:\a\1\s\artifacts\bin\Microsoft.AspNetCore.Components.WebView.Maui\Debug\net10.0-windows10.0.19041.0\Microsoft.AspNetCore.Components.WebView.Maui.dll
  Controls.TestCases.HostApp -> D:\a\1\s\artifacts\bin\Controls.TestCases.HostApp\Debug\net10.0-windows10.0.19041.0\win-x64\Controls.TestCases.HostApp.dll

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:05:47.81
  Determining projects to restore...
  Restored D:\a\1\s\src\TestUtils\src\VisualTestUtils\VisualTestUtils.csproj (in 865 ms).
  Restored D:\a\1\s\src\TestUtils\src\UITest.NUnit\UITest.NUnit.csproj (in 1.31 sec).
  Restored D:\a\1\s\src\TestUtils\src\UITest.Core\UITest.Core.csproj (in 3 ms).
  Restored D:\a\1\s\src\TestUtils\src\UITest.Appium\UITest.Appium.csproj (in 1.92 sec).
  Restored D:\a\1\s\src\TestUtils\src\VisualTestUtils.MagickNet\VisualTestUtils.MagickNet.csproj (in 5.45 sec).
  Restored D:\a\1\s\src\TestUtils\src\UITest.Analyzers\UITest.Analyzers.csproj (in 8.27 sec).
  Restored D:\a\1\s\src\Controls\tests\CustomAttributes\Controls.CustomAttributes.csproj (in 4 ms).
  Restored D:\a\1\s\src\Controls\tests\TestCases.WinUI.Tests\Controls.TestCases.WinUI.Tests.csproj (in 7.65 sec).
  7 of 15 projects are up-to-date for restore.
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681911
  Graphics -> D:\a\1\s\artifacts\bin\Graphics\Debug\net10.0\Microsoft.Maui.Graphics.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681911
  Essentials -> D:\a\1\s\artifacts\bin\Essentials\Debug\net10.0\Microsoft.Maui.Essentials.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681911
  Controls.CustomAttributes -> D:\a\1\s\artifacts\bin\Controls.CustomAttributes\Debug\net10.0\Controls.CustomAttributes.dll
  Core -> D:\a\1\s\artifacts\bin\Core\Debug\net10.0\Microsoft.Maui.dll
  Controls.Core.Design -> D:\a\1\s\artifacts\bin\Controls.Core.Design\Debug\net472\Microsoft.Maui.Controls.DesignTools.dll
  Controls.BindingSourceGen -> D:\a\1\s\artifacts\bin\Controls.BindingSourceGen\Debug\netstandard2.0\Microsoft.Maui.Controls.BindingSourceGen.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681911
  Controls.Core -> D:\a\1\s\artifacts\bin\Controls.Core\Debug\net10.0\Microsoft.Maui.Controls.dll
  VisualTestUtils -> D:\a\1\s\artifacts\bin\VisualTestUtils\Debug\netstandard2.0\VisualTestUtils.dll
  UITest.Core -> D:\a\1\s\artifacts\bin\UITest.Core\Debug\net10.0\UITest.Core.dll
  VisualTestUtils.MagickNet -> D:\a\1\s\artifacts\bin\VisualTestUtils.MagickNet\Debug\netstandard2.0\VisualTestUtils.MagickNet.dll
  UITest.Appium -> D:\a\1\s\artifacts\bin\UITest.Appium\Debug\net10.0\UITest.Appium.dll
  UITest.NUnit -> D:\a\1\s\artifacts\bin\UITest.NUnit\Debug\net10.0\UITest.NUnit.dll
  UITest.Analyzers -> D:\a\1\s\artifacts\bin\UITest.Analyzers\Debug\netstandard2.0\UITest.Analyzers.dll
  Controls.TestCases.WinUI.Tests -> D:\a\1\s\artifacts\bin\Controls.TestCases.WinUI.Tests\Debug\net10.0\Controls.TestCases.WinUI.Tests.dll
Test run for D:\a\1\s\artifacts\bin\Controls.TestCases.WinUI.Tests\Debug\net10.0\Controls.TestCases.WinUI.Tests.dll (.NETCoreApp,Version=v10.0)
VSTest version 18.0.1 (x64)

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
D:\a\1\s\artifacts\bin\Controls.TestCases.WinUI.Tests\Debug\net10.0\Controls.TestCases.WinUI.Tests.dll
NUnit Adapter 4.5.0.0: Test execution started
Running selected tests in D:\a\1\s\artifacts\bin\Controls.TestCases.WinUI.Tests\Debug\net10.0\Controls.TestCases.WinUI.Tests.dll
   NUnit3TestExecutor discovered 1 of 1 NUnit test cases using Current Discovery mode, Non-Explicit run
>>>>> 3/29/2026 12:30:34 AM FixtureSetup for Issue16119(Windows)
>>>>> 3/29/2026 12:30:46 AM VerifyMenuFlyoutIconDisplaysOriginalColor Start
>>>>> 3/29/2026 12:30:48 AM VerifyMenuFlyoutIconDisplaysOriginalColor Stop
  Passed VerifyMenuFlyoutIconDisplaysOriginalColor [2 s]
NUnit Adapter 4.5.0.0: Test execution complete
[xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.8.2+699d445a1a (64-bit .NET 10.0.0)
[xUnit.net 00:00:00.11]   Discovering: Controls.TestCases.WinUI.Tests
[xUnit.net 00:00:00.31]   Discovered:  Controls.TestCases.WinUI.Tests

Test Run Successful.
Total tests: 1
     Passed: 1
 Total time: 43.1814 Seconds

🟢 With fix — 🖥️ Issue16119: PASS ✅ · 453s
  Determining projects to restore...
  All projects are up-to-date for restore.
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681911
  Graphics -> D:\a\1\s\artifacts\bin\Graphics\Debug\net10.0-windows10.0.19041.0\Microsoft.Maui.Graphics.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681911
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681911
  Graphics.Win2D -> D:\a\1\s\artifacts\bin\Graphics.Win2D\Debug\net10.0-windows10.0.19041.0\Microsoft.Maui.Graphics.Win2D.WinUI.Desktop.dll
  Essentials -> D:\a\1\s\artifacts\bin\Essentials\Debug\net10.0-windows10.0.19041.0\Microsoft.Maui.Essentials.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681911
  Core -> D:\a\1\s\artifacts\bin\Core\Debug\net10.0-windows10.0.19041.0\Microsoft.Maui.dll
  Controls.BindingSourceGen -> D:\a\1\s\artifacts\bin\Controls.BindingSourceGen\Debug\netstandard2.0\Microsoft.Maui.Controls.BindingSourceGen.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681911
  Maps -> D:\a\1\s\artifacts\bin\Maps\Debug\net10.0-windows10.0.19041.0\Microsoft.Maui.Maps.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681911
  Controls.Core -> D:\a\1\s\artifacts\bin\Controls.Core\Debug\net10.0-windows10.0.19041.0\Microsoft.Maui.Controls.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681911
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681911
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681911
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681911
  Controls.Xaml -> D:\a\1\s\artifacts\bin\Controls.Xaml\Debug\net10.0-windows10.0.19041.0\Microsoft.Maui.Controls.Xaml.dll
  Microsoft.AspNetCore.Components.WebView.Maui -> D:\a\1\s\artifacts\bin\Microsoft.AspNetCore.Components.WebView.Maui\Debug\net10.0-windows10.0.19041.0\Microsoft.AspNetCore.Components.WebView.Maui.dll
  Controls.Foldable -> D:\a\1\s\artifacts\bin\Controls.Foldable\Debug\net10.0-windows10.0.19041.0\Microsoft.Maui.Controls.Foldable.dll
  Controls.Maps -> D:\a\1\s\artifacts\bin\Controls.Maps\Debug\net10.0-windows10.0.19041.0\Microsoft.Maui.Controls.Maps.dll
  Controls.TestCases.HostApp -> D:\a\1\s\artifacts\bin\Controls.TestCases.HostApp\Debug\net10.0-windows10.0.19041.0\win-x64\Controls.TestCases.HostApp.dll

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:05:35.44
  Determining projects to restore...
  All projects are up-to-date for restore.
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681911
  Graphics -> D:\a\1\s\artifacts\bin\Graphics\Debug\net10.0\Microsoft.Maui.Graphics.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681911
  Essentials -> D:\a\1\s\artifacts\bin\Essentials\Debug\net10.0\Microsoft.Maui.Essentials.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681911
  Core -> D:\a\1\s\artifacts\bin\Core\Debug\net10.0\Microsoft.Maui.dll
  Controls.CustomAttributes -> D:\a\1\s\artifacts\bin\Controls.CustomAttributes\Debug\net10.0\Controls.CustomAttributes.dll
  Controls.Core.Design -> D:\a\1\s\artifacts\bin\Controls.Core.Design\Debug\net472\Microsoft.Maui.Controls.DesignTools.dll
  Controls.BindingSourceGen -> D:\a\1\s\artifacts\bin\Controls.BindingSourceGen\Debug\netstandard2.0\Microsoft.Maui.Controls.BindingSourceGen.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681911
  Controls.Core -> D:\a\1\s\artifacts\bin\Controls.Core\Debug\net10.0\Microsoft.Maui.Controls.dll
  UITest.Core -> D:\a\1\s\artifacts\bin\UITest.Core\Debug\net10.0\UITest.Core.dll
  UITest.Appium -> D:\a\1\s\artifacts\bin\UITest.Appium\Debug\net10.0\UITest.Appium.dll
  UITest.NUnit -> D:\a\1\s\artifacts\bin\UITest.NUnit\Debug\net10.0\UITest.NUnit.dll
  VisualTestUtils -> D:\a\1\s\artifacts\bin\VisualTestUtils\Debug\netstandard2.0\VisualTestUtils.dll
  VisualTestUtils.MagickNet -> D:\a\1\s\artifacts\bin\VisualTestUtils.MagickNet\Debug\netstandard2.0\VisualTestUtils.MagickNet.dll
  UITest.Analyzers -> D:\a\1\s\artifacts\bin\UITest.Analyzers\Debug\netstandard2.0\UITest.Analyzers.dll
  Controls.TestCases.WinUI.Tests -> D:\a\1\s\artifacts\bin\Controls.TestCases.WinUI.Tests\Debug\net10.0\Controls.TestCases.WinUI.Tests.dll
Test run for D:\a\1\s\artifacts\bin\Controls.TestCases.WinUI.Tests\Debug\net10.0\Controls.TestCases.WinUI.Tests.dll (.NETCoreApp,Version=v10.0)
VSTest version 18.0.1 (x64)

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
D:\a\1\s\artifacts\bin\Controls.TestCases.WinUI.Tests\Debug\net10.0\Controls.TestCases.WinUI.Tests.dll
NUnit Adapter 4.5.0.0: Test execution started
Running selected tests in D:\a\1\s\artifacts\bin\Controls.TestCases.WinUI.Tests\Debug\net10.0\Controls.TestCases.WinUI.Tests.dll
   NUnit3TestExecutor discovered 1 of 1 NUnit test cases using Current Discovery mode, Non-Explicit run
>>>>> 3/29/2026 12:38:11 AM FixtureSetup for Issue16119(Windows)
>>>>> 3/29/2026 12:38:21 AM VerifyMenuFlyoutIconDisplaysOriginalColor Start
>>>>> 3/29/2026 12:38:23 AM VerifyMenuFlyoutIconDisplaysOriginalColor Stop
  Passed VerifyMenuFlyoutIconDisplaysOriginalColor [2 s]
NUnit Adapter 4.5.0.0: Test execution complete
[xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.8.2+699d445a1a (64-bit .NET 10.0.0)
[xUnit.net 00:00:00.11]   Discovering: Controls.TestCases.WinUI.Tests
[xUnit.net 00:00:00.32]   Discovered:  Controls.TestCases.WinUI.Tests

Test Run Successful.
Total tests: 1
     Passed: 1
 Total time: 26.0778 Seconds

⚠️ Issues found
  • Issue16119 PASSED without fix (should fail) — tests don't catch the bug
📁 Fix files reverted (3 files)
  • eng/pipelines/ci-copilot.yml
  • src/Core/src/Handlers/MenuFlyoutItem/MenuFlyoutItemHandler.Windows.cs
  • src/Core/src/Handlers/MenuFlyoutSubItem/MenuFlyoutSubItemHandler.Windows.cs

Copy link
Copy Markdown
Contributor

@kubaflo kubaflo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the test couldn't catch a bug before fix - could you please verify?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration s/agent-changes-requested AI agent recommends changes - found a better alternative or issues s/agent-fix-win AI found a better alternative fix than the PR s/agent-gate-failed AI could not verify tests catch the bug s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MenuFlyoutItem with FileImageSource doesn't display icon properly

6 participants